import httpInstance from "@/utils/http";

export function addCartAPI({ skuId, count }: { skuId: string, count: number }) {
	return httpInstance({
		url: "/member/cart",
		method: "POST",
		data: {
			skuId,
			count,
		},
	});
}

export function delCartAPI(ids: string[]) {
	return httpInstance({
		url: "/member/cart",
		method: "DELETE",
		data: {
			ids,
		}
	});
}

export function findNewCartListAPI() {
	return httpInstance({
		url: "/member/cart",
	});
}

export function mergeCartAPI(data: any) {
	return httpInstance({
		url: "/member/cart/merge",
		method: "POST",
		data,
	});
}